//
//  AkuMainTabBarController.swift
//  AkuSina
//
//  Created by 阿酷 on 16/7/19.
//  Copyright © 2016年 AkuApp. All rights reserved.
//

import UIKit

class AkuMainTabBarController: UITabBarController {

    override func viewDidLoad() {
        super.viewDidLoad()

        
        
        
//        setUpChildViewController(AkuHomeController(), vcTitle: "首页", vcImageStr: "tabbar_home")
//        setUpChildViewController(AkuDiscoverController(), vcTitle: "消息", vcImageStr: "tabbar_home")
//        setUpChildViewController(AkuMessageController(), vcTitle: "发现", vcImageStr: "tabbar_home")
//        setUpChildViewController(AkuProfileController(), vcTitle: "我", vcImageStr: "tabbar_home")
        
    }

    func setUpChildViewController(vc: UIViewController, vcTitle: String, vcImageStr: String) {
        
        
        vc.title = vcTitle
        
        vc.tabBarItem.image = UIImage(named: vcImageStr)?.imageWithRenderingMode(.AlwaysOriginal)
        vc.tabBarItem.selectedImage = UIImage(named: "\(vcImageStr)\("_selected")")?.imageWithRenderingMode(.AlwaysOriginal)
        vc.tabBarItem.setTitleTextAttributes([NSForegroundColorAttributeName: UIColor.orangeColor()], forState: .Selected)
        
        addChildViewController(vc)
        
    }



}
